home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- set -e
-
- if [ -f /usr/share/debconf/confmodule ]; then
- . /usr/share/debconf/confmodule
- fi
-
- # Automatically added by dh_installmenu
- if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
- update-menus
- fi
- # End automatically added section
-
- case "$1" in
- configure|reconfigure)
-
- # if a new install then we create the link and exit
- if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then
- exit 0
- fi
-
- # Check whether /boot is on another partition and mount it. See Bug#216250
-
- if grep "[[:space:]]/boot[[:space:]]" /etc/fstab | grep -vq ^#; then
- if ! grep -q "[[:space:]]/boot[[:space:]]" /etc/mtab ; then
- mount /boot 2>&1 > /dev/null
-
- if [ $? -ne 0 ]; then
- echo
- echo "WARNING: /boot is in another partition but could not be mounted."
- echo "LILO may fail in the next steps."
- fi
- fi
- fi
-
- cp /usr/share/lilo/*.bmp /boot
-
- if [ -L /boot/debian.bmp ]; then
- if [ x`readlink /boot/debian.bmp | cut -d/ -f 2` != x"boot" ]; then
- ln -sf /boot/sid.bmp /boot/debian.bmp
- fi
- fi
-
- if [ ! -e /boot/debian.bmp ]; then
- ln -sf /boot/sarge.bmp /boot/debian.bmp
- fi
-
- # Nasty part to create network block devices if needed. Bug#235805.
- if [ `uname -r | sed -e 's/-.*//g' -ne 's/\(^[0-9]\{1\}\.[0-9]\{1,2\}\).*/\1/p'` = "2.6" ] && \
- [ `uname -r | sed -e 's/-.*//g' -ne 's/.*\.\([0-9]\{1,3\}\).*/\1/p'` -ge "3" ]; then
-
- garbage=$(cat /proc/partitions | sed -ne 's/^[ \t]*//pg' | sed -ne '/^43/p')
-
- if [ x"$garbage" != "x" ]; then
-
- # Create the missing devices
- echo -n "Creating network block devices... "
- pushd /dev > /dev/null
- ./MAKEDEV nb
- popd > /dev/null
- echo "done."
- fi
- fi
-
- db_get lilo/runme || true;
- if [ x"$RET" = x"true" ]; then
- echo "Running lilo..."
- /sbin/lilo
- fi
-
- ;;
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
- esac
-
- exit 0
-